use derive_builder::Builder;
use std::collections::HashMap;

use serde::{Deserialize, Serialize};

use crate::{
    error::Error,
    modeling::{
        Class, ComparsionOperator, LogicalOperator, PagingResponse, RelationDirection,
        RelationRelatedType, RelationType, RelationTypeOperator, Value, ValueOperator,
    },
};

use crate::database::DataSource;

use super::{AttributeCondition, ClassRelationCondition};

#[derive(Debug, Default, Serialize, Deserialize, Clone, Builder, PartialEq)]
#[builder(name = "QueryConditionExpressionBuilder")]
#[builder(pattern = "mutable")]
#[builder(setter(into, strip_option), default)]
#[builder(derive(Debug))]
#[builder(build_fn(error = "Error"))]
pub struct QueryConditionExpression {
    pub operator: LogicalOperator,
    pub left_expression: Option<Box<QueryConditionExpression>>,
    pub right_expression: Option<Box<QueryConditionExpression>>,
    pub left: Option<String>,
    pub value: Option<String>,
    pub values: Option<Vec<String>>,
}
